package org.lbroussal.client.model;

import org.lbroussal.client.model.vo.UserVO;
import org.puremvc4gwt.client.patterns.proxy.Proxy;

/**
 * @author nick-vintila
 * @date Oct 10, 2008 7:20:12 PM
 */
public class UserDataProxy extends Proxy<UserVO> {

    public static final String NAME = "User";

    private int loginFailCount = 0;

    /**
     *
     */
    public UserDataProxy() {
        super(NAME, new UserVO());
    }

    public int incrementAndGetLoginFailCount() {
        return ++loginFailCount;
    }

    public void resetLoginFailCount() {
        loginFailCount = 0;
    }

    public void clear() {
        resetLoginFailCount();
        setData(null);        
    }
}
